package Ali;

import java.util.Scanner;

/**
 * @author le
 */
public class Test33
{
    public static void main(String[] args)
    {
        System.out.println(findMaxButtons(null));
    }

    public static long findMaxButtons (int[] buttons) {
        int[] res = {2,3,2};
        int[] dp = new int[res.length];
        int count = 0;
        dp[0] = res[0];
        for (int i = 1;i < res.length;i++){
            dp[i] = (res[i]-1)*(i+1)+1;
        }
        for (int i = 0;i < dp.length;i++){
            count += dp[i];
        }

        return count;
    }

}
